<?php
	$this->title('Add Icd Entry');
?>

<h3>Add Icd Nine Entry</h3>

<?=$this->form->create($icdNineEntry);?>
<?=$this->form->label('Patient');?>
<?php 
	$patientCollection = array();
	foreach ($patients as $patient) {
		$patientCollection[$patient->id] = $patient->PatID;
	}
?>
<?=$this->form->select('patient_id', $patientCollection);?>

<?=$this->form->label('Code ID');?>
<?php
	$codeCollection = array();
	foreach ($icdCodesCollection as $icdCodesEntry) {
		$codeCollection[$icdCodesEntry->id] = $icdCodesEntry->code . " : " . $icdCodesEntry->name;
	}
?>
<?=$this->form->select('code_id', $codeCollection);?>
<?=$this->form->field('date_given', array('label' => 'Date Given'));?>
<?=$this->form->submit('Save'); ?>
<?=$this->form->end();?>